#ifndef SERVERUI_H
#define SERVERUI_H

#include<Server.h>
#include<QWidget>
#include<QListWidget>
#include<QLabel>
#include<QLineEdit>
#include<QPushButton>
#include<QGridLayout>

class ServerUI : public QWidget
{
    Q_OBJECT

public:
    ServerUI(QWidget *parent = 0);
    ~ServerUI();
signals:
    void createServer();
    void closeServer();

public slots:
    void slotServerSwitch();
    void slotupdateServerUI(QString);
    void slotCreateServer();
private:
    int port;
    bool isCreated;
    Server *server;

    QListWidget *infoListWidget;
    QLabel *LabelPort;
    QLineEdit *LineEditPort;
    QPushButton *BtnServerSwitch;

    QGridLayout *mainLayout;

};

#endif // TCPSERVERUI_H
